package com.gxa.modules.service.impl;

import com.gxa.common.vo.JsonResult;
import com.gxa.modules.mapper.LogMapper;
import com.gxa.modules.mapper.ValuecardMapper;
import com.gxa.modules.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class SysLogServiceImpl implements SysLogService {
    @Autowired(required = false)
    private LogMapper logMapper;

        //    @Autowired
//    private RedisTemplate redisTemplate;
        @Override
        public JsonResult querySysLogMap(Integer page, Integer limit) {
//        redisTemplate.opsForValue().set("key","gxa");

            JsonResult jsonResult = new JsonResult();
            Integer param1 = (page - 1)*limit;
            Integer param2 = limit;
            List<Map> contractMap = logMapper.querySysLogMap(param1,param2);
            int result = logMapper.countSysLogMap();
            jsonResult.setCount(result);
            jsonResult.setData(contractMap);
            jsonResult.setCode(200);
            jsonResult.setMsg("查询成功");

            return jsonResult;
    }

}
